import { app } from 'electron'
import { Knex, knex } from 'knex'
import { resolve } from 'path'

const _USER_DATA_PATH = app.getPath('userData')
const config: Knex.Config = {
  client: 'sqlite3',
  connection: {
    filename: resolve(_USER_DATA_PATH, 'data.db')
  }
}
const knexInstance = knex(config)
export default knexInstance
